############################# Folders Description ##############################

Anaconda_Env/ : includes a virtual environment file neurips22.yml for building dependencies;
scripts/: includes the main file for each proposed algorithm;
src/: includes all source files for each proposed algorithm;
experiments/: includes a sub-folder for each considered domain; and each sub-folder includes 
              a bash file for each proposed algorithm, where the commands for reproducing our results are given;
visualization/: includes code for visualizing learned behaviors.


############################# Dependencies Installation ##############################

cd macro_marl/Anaconda_Env
conda env create -f neurips22.yml 
conda activate neurips22

cd macro_marl/
pip install -e .


######################### Reproduce the Results Shown in the Paper ##################### 

Our results are generated by running on a cluster of computer nodes under "CentOS Linux" 
operating system. We use the CPUs including "Dual Intel Xeon E5-2650", 
"Dual Intel Xeon E5-2680 v2", "Dual Intel Xeon E5-2690 v3". The codes also have been tested
under Ubuntu 18.04 system.

### To reproduce the results of each method under Box Pushing domain

cd experiments/BoxPushing/
source iac.sh
source cac.sh
source mac_iac.sh
source mac_cac.sh
source mac_naive_iacc.sh
source ma_iaicc.sh
source ma_dec_q.sh
source ma_cen_q.sh

### To reproduce the results of each method under Overcooked domain

cd experiments/Overcooked/
source iac.sh
source cac.sh
source mac_iac.sh
source mac_cac.sh
source mac_naive_iacc.sh
source ma_iaicc.sh
source ma_dec_q.sh
source ma_cen_q.sh

### To reproduce the results of each method under Warehouse domain

cd experiments/Warehouse/
source mac_iac.sh
source mac_cac.sh
source mac_naive_iacc.sh
source ma_iaicc.sh
source ma_dec_q.sh
source ma_cen_q.sh

*NOTE*: The commands in each bash file will launch all experiments (20 independent runs) in
the corresponding domain with multiple configurations. If there is no enough computing resource, 
user may have to look into the bash files and launch each experiment separately. 

All results are saved in performance/ folder, and all learned policies are saved in policy_nns/ folder.


######################### Behaviors Visualization ##################### 

### Box Pushing 14x14

cd visualization
python test_bp_ma.py --p_id=0 --grid_dim 14 14 --scenario='14x14'

### Overcooked-A three agents

cd visualization
python test_overcooked_ma.py --env_id  Overcooked-PO-MA-v1 --mapType A --n_agent 3 --p_id 13 --task 6

### Overcooked-B three agents

cd visualization
python test_overcooked_ma.py --env_id  Overcooked-mapBC-PO-MA-v1 --mapType B --n_agent 3 --p_id 10 --task 6

### Overcooked-C three agents

cd visualization
python test_overcooked_ma.py --env_id  Overcooked-mapBC-PO-MA-v1 --mapType C --n_agent 3  --p_id 12 --task 6

### Warehouse-A

cd visualization
python test_osd_s_policy_dec.py --env_id='OSD-D-v7' --scenario=2720 --n_agent=3 --p_id=1

### Warehouse-B

cd visualization
python test_osd_s_policy_dec.py --env_id='OSD-T-v0' --scenario=40 --n_agent=3 --p_id=9

### Warehouse-C

cd visualization
python test_osd_s_policy_dec.py --env_id='OSD-T-v1' --scenario=4R383827 --n_agent=4 --p_id=11

### Warehouse-D

cd visualization
python test_osd_s_policy_dec.py --env_id='OSD-F-v0' --scenario=v040 --n_agent=4 --p_id=19

### Warehouse-E

cd visualization
python test_osd_s_policy_dec.py --env_id='OSD-D-v7' --scenario=1848005 --n_agent=3 --p_id=15
